import type { DictionaryDto, EnumDto, PageDto, PageReqDto, PagesDto } from '@/api/types'
import type { CompanyAuditStatusEnum, OccupationAuditStatusCnEnum, ProductTypeCnEnum, ProductTypeEnum } from '@/const/enum'
import request from '@/utils/request'
import type { PeriodOccupationDto } from './types'

/**
 * 获取长期保审核列表
 * @param params 
 * @returns 
 */
export function getPeriodOccupationRecordList(params: PageReqDto & {
    serveCompanyOrCompanyName?: string
}): Promise<PageDto<PeriodOccupationDto>>{
    return request.get('/crm-prod-v2/web/pc/crm/insureOccupationRecord/page', {
        params
    })
}

/**
 * 工种审核
 * @param params 
 * @returns 
 */
export function auditOccupation(data: {
    id: number
    auditStatus?: OccupationAuditStatusCnEnum,
    auditRemark?: string
    occupationIds?: number[]
    specialAppoint?: string
}): Promise<PageDto<PeriodOccupationDto>>{
    return request.put('/crm-prod-v2/web/pc/crm/insureOccupationRecord/audit', data)
}
